package com.yhgarden.bbs.mapper.system;

import com.yhgarden.bbs.entity.system.Permissions;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by caimb on 2017/4/27.
 */
public interface PermissionsMapper {

    public int create(Permissions permissions);

    public int update(Permissions permissions);

    public int delete(@Param("id") String id);

    public Permissions getById(String id);

    public Permissions getByIdMoreDetail(String id);

    public List<Permissions> query(@Param("example") Permissions permissions,
                            @Param("order") String order,
                            @Param("field") String field);

    public List<Permissions> queryMoreDetail(@Param("example") Permissions permissions,
                                      @Param("order") String order,
                                      @Param("field") String field);

    public List<Permissions> getPermissionssByRoleIdAndUserId(@Param("roleIds") List<String> roleIds, @Param("userId") String userId);
}
